package com.bitters.kafka.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA
 * Created By thomas
 * Date: 2019/5/9
 * Description ${description}
 * Time: 16:11
 */
@Configuration
public class KafkaConfig {

    @Value("${spring.kafka.admin.bootstrap-servers}")
    public String servers;

    public KafkaConfig() {
    }

    @Bean
    public NewTopic topic() {
        return new NewTopic("kafka1", 3, (short) 3);
    }
}
